package com.lzxzjy.pojo;

public class Message {
    private Integer messageId;
    private String messageTitle;
    private String messageContent;
    private Integer messageState;
    private Integer readerId;
    private String readerName;
    private String messageReturn;
    private Integer messageReturnState;

    public Message(Integer messageId, String messageTitle, String messageContent, Integer messageState, Integer readerId, String readerName, String messageReturn, Integer messageReturnState) {
        this.messageId = messageId;
        this.messageTitle = messageTitle;
        this.messageContent = messageContent;
        this.messageState = messageState;
        this.readerId = readerId;
        this.readerName = readerName;
        this.messageReturn = messageReturn;
        this.messageReturnState = messageReturnState;
    }

    public Message() {
    }

    public Integer getMessageId() {
        return messageId;
    }

    public void setMessageId(Integer messageId) {
        this.messageId = messageId;
    }

    public String getMessageTitle() {
        return messageTitle;
    }

    public void setMessageTitle(String messageTitle) {
        this.messageTitle = messageTitle;
    }

    public String getMessageContent() {
        return messageContent;
    }

    public void setMessageContent(String messageContent) {
        this.messageContent = messageContent;
    }

    public Integer getMessageState() {
        return messageState;
    }

    public void setMessageState(Integer messageState) {
        this.messageState = messageState;
    }

    public Integer getReaderId() {
        return readerId;
    }

    public void setReaderId(Integer readerId) {
        this.readerId = readerId;
    }

    public String getReaderName() {
        return readerName;
    }

    public void setReaderName(String readerName) {
        this.readerName = readerName;
    }

    public Integer getMessageReturnState() {
        return messageReturnState;
    }

    public void setMessageReturnState(Integer messageReturnState) {
        this.messageReturnState = messageReturnState;
    }

    public String getMessageReturn() {
        return messageReturn;
    }

    public void setMessageReturn(String messageReturn) {
        this.messageReturn = messageReturn;
    }

    @Override
    public String toString() {
        return "Message{" +
                "messageId=" + messageId +
                ", messageTitle='" + messageTitle + '\'' +
                ", messageContent='" + messageContent + '\'' +
                ", messageState=" + messageState +
                ", readerId=" + readerId +
                ", readerName='" + readerName + '\'' +
                ", messageReturn='" + messageReturn + '\'' +
                ", messageReturnState=" + messageReturnState +
                '}';
    }

    public String getMessageStateStr() {
        if (this.messageState == null) {
            return "未知";
        } else {
            return this.messageState == 0 ? "未读" : "已回";
        }
    }

    public String getMessageReturnStateStr() {
        if (this.messageReturnState == null) {
            return "未知";
        } else {
            return this.messageReturnState == 0 ? "未读" : "已读";
        }
    }
}
